<!DOCTYPE html> 
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="/brython.css">

<link rel="stylesheet" href="console.css">

<script src="../tests/ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="../tests/ace/ext-language_tools.js" type="text/javascript" charset="utf-8"></script>
<script src="../tests/ace/mode-python3.js" type="text/javascript" charset="utf-8"></script>
<script src="../tests/ace/snippets/python.js" type="text/javascript" charset="utf-8"></script>
</script>

<script type="text/javascript" src="../../src/brython_builtins.js"></script>
<script type="text/javascript" src="../../src/version_info.js"></script>
<script type="text/javascript" src="../../src/identifiers_re.js"></script>
<script type="text/javascript" src="../../src/py2js.js"></script>
<script type="text/javascript" src="../../src/py_object.js"></script>
<script type="text/javascript" src="../../src/py_type.js"></script>
<script type="text/javascript" src="../../src/py_utils.js"></script>
<script type="text/javascript" src="../../src/py_sort.js"></script>
<script type="text/javascript" src="../../src/py_builtin_functions.js"></script>
<script type="text/javascript" src="../../src/py_bytes.js"></script>
<script type="text/javascript" src="../../src/py_set.js"></script>
<script type="text/javascript" src="../../src/js_objects.js"></script>
<script type="text/javascript" src="../../src/stdlib_paths.js"></script>
<script type="text/javascript" src="../../src/py_import.js"></script>

<script type="text/javascript" src="../../src/py_string.js"></script>
<script type="text/javascript" src="../../src/py_int.js"></script>
<script type="text/javascript" src="../../src/py_float.js"></script>
<script type="text/javascript" src="../../src/py_complex.js"></script>
<script type="text/javascript" src="../../src/py_dict.js"></script>
<script type="text/javascript" src="../../src/py_list.js"></script>
<script type="text/javascript" src="../../src/py_generator.js"></script>
<script type="text/javascript" src="../../src/py_dom.js"></script>
<script type="text/javascript" src="../../src/async.js"></script>

<script type="text/javascript" src="../../src/builtin_modules.js"></script>
<script type="text/javascript" src="../src/py_import_hooks.js"></script>

<script type="text/python3">
from browser import document as doc, timer
import time
import sys
import perf_bookkeeping

class cOutput:
    def write(self, data):
        doc["console"].innerHTML += str(data)

    def flush(self):
        pass

sys.stdout = cOutput()
sys.stderr = cOutput()

_bk=perf_bookkeeping.bookkeeping()

script_num = -1
failed = []
t_start = None

def test_next():
    global script_num,failed
    script_num += 1
    if script_num < len(tests):
        filename = tests[script_num]
        src = open('benchmarks/%s' % filename).read()
        _bk.set_performance_test(filename)
        state=_bk.run_performance_test(src)
        if state == 0:
            failed.append(option.text)
        timer.set_timeout(test_next,500)
    else:
        _bk.upload_results()
        #doc['console'].value = ''
        #print('completed all tests in %.2f s' %(time.time()-t_start))
        #print('failed : %s' %failed)
    
tests=["assignment.py", "augm_assign.py", "assignment_float.py",
       "build_dict.py", "set_dict_item.py", "build_list.py",
       "set_list_item.py", "add_integers.py", "add_strings.py",
       "function_call.py", "add_dict.py"] 

script_num = -1
failed = []
test_next()
</script>

<script type="text/python3">
from browser import document
import header

qs_lang,language = header.show()

# other translations

trans = {
    'report_bugs':{'en':'Please report bugs in the ',
                   'es':'Poner los bugs en el ',
                   'fr':"Signalez les bugs dans l'"},
    'test_page':{'en':'Tests page','es':'Página de pruebas','fr':'Page de tests'},
    'run':{'en':'run','es':'ejecutar','fr':'exécuter'},
    'clear':{'en':'clear','es':'borrar','fr':'effacer'}
}

for key in trans:
    if key in document:
        document[key].html = trans[key][language]

</script>

</head>
<body onload="brython({debug:1, cache:'none', static_stdlib_import:true})">

<table id=banner cellpadding=0 cellspacing=0>
<tr id=banner_row >
<td class="logo"><a href="../index.html"><img src="../brython.svg" class="logo"></a></td>
</tr>
</table>

</center>


<div id="container" style="width:100%;height:100%">
</div>

</div>
</div>
</body>
</html>
